;
(function () {
	$(function() {
    	 

        $("input").click(function(){
            
        })


    	$("#tab li").click(function(){
    		$("#tab li").eq($(this).index()).addClass("cur").siblings().removeClass('cur');
			$("#container .page").hide().eq($(this).index()).show();
            if ($(this).index()==0) {
                $(this).css("background-image","url(images/index/learn-c.gif)").siblings().css("background-image","url(images/index/medal.gif)");
            }
            else{
                $(this).css("background-image","url(images/index/medal-c.gif)").siblings().css("background-image","url(images/index/learn.gif)");
            }
	 
     	});

        $.ajax({
            type:'Get',
            url: root + '/teacher/index',
            dataType:'json',
            success:function (response) {
               var data=response.data;
               $.each(data,function (index,value) {
                   $(template("scrollpic",value)).appendTo($(".picsc"));
               })
               $("img.lazy").lazyload({
					container: $(".picscroll"),
					effect : "fadeIn"
				});
            }
        });



	})
})();

